package com.wizz.trade.information.mapper;

import com.wizz.trade.information.entity.Variety;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 品种表 Mapper 接口
 * </p>
 *
 * @author fyftless
 * @since 2023-04-02 04:26:06
 */
@Mapper
public interface VarietyMapper extends BaseMapper<Variety> {
    /**
     * 列出所有品种id和名称
     * @return
     */
    List<Variety> getAllName();

    String getNameById(@Param("id") Integer variety);

    /**
     * 获取品种名map
     * @return
     */
    List<Map<Integer, String>> getNames();

    /**
     * 获取键值对
     * @return 键值对
     */
    List<Map<Integer, String>> getOptions();

}
